package com.allwees.bs.core.model.coupon.constant;

import com.baomidou.mybatisplus.core.enums.IEnum;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * 优惠券使用用途
 *
 * @author mouhaining
 * @since 2020-05-19 19:25
 */
@Getter
public enum ECouponUseType implements IEnum<String> {

    SYSTEM_SING_FIRST(ChangeDirection.POSITIVE),//首次签到
    SYSTEM_SING(ChangeDirection.POSITIVE),//签到

    @Deprecated
    SYSTEM_REGISTERED(ChangeDirection.POSITIVE),//注册-自动赠送
    SYSTEM_REGISTERED_PICK(ChangeDirection.POSITIVE),//新注册用户手动领取
    SYSTEM_INVITEE_REGISTER(ChangeDirection.POSITIVE),//邀请推荐码

    USER_RECEIVE(ChangeDirection.POSITIVE), //用户领取
    POINT_EXCHANGE_1(ChangeDirection.POSITIVE), //积分兑换1
    POINT_EXCHANGE_2(ChangeDirection.POSITIVE), //积分兑换2
    POINT_EXCHANGE_3(ChangeDirection.POSITIVE), //积分兑换3
    ;

    private ChangeDirection pointActiveType;

    ECouponUseType(ChangeDirection pointActiveType) {
        this.pointActiveType = pointActiveType;
    }

    @Override
    public String getValue() {
        return name();
    }

    public static List<ECouponUseType> pointExchanges(){
        return Arrays.asList(POINT_EXCHANGE_1, POINT_EXCHANGE_2, POINT_EXCHANGE_3);
    }
}
